package com.hkjtgc.pcr_app.util

import android.app.ProgressDialog.show
import android.content.Context
import android.widget.Toast
import kotlinx.coroutines.CoroutineScope

internal object ToastUtil {

    fun toast(context: Context, duration: Int = Toast.LENGTH_SHORT): Toast {
        return Toast.makeText(context, this.toString(), duration).apply { show() }
    }

    fun toastShort(context: Context, msg: String): Toast {
        return Toast.makeText(context, msg, Toast.LENGTH_SHORT).apply { show() }
    }


    fun toastLong(context: Context, msg: String): Toast {
        return Toast.makeText(context, msg, Toast.LENGTH_LONG).apply { show() }
    }
}